import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _applyDecoratedDescriptor from "@babel/runtime/helpers/esm/applyDecoratedDescriptor";

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _class, _class2;

/**
 * Email 邮箱
 * @date: 2018-7-25


 */
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Form, Table, Tag, Popconfirm } from 'antd';
import { Bind } from 'lodash-decorators';
import { Header, Content } from 'components/Page';
import { Button as ButtonPermission } from 'components/Permission';
import notification from 'utils/notification';
import formatterCollections from 'utils/intl/formatterCollections';
import intl from 'utils/intl';
import { getCurrentOrganizationId, isTenantRoleLevel, tableScrollWidth, encryptPwd } from 'utils/utils';
import { enableRender, operatorRender } from 'utils/renderer';
import { VERSION_IS_OP } from 'utils/config';
import EmailForm from "./EmailForm";
import SearchForm from "./SearchForm";
import Filter from "./Filter";
var Email = (_dec = formatterCollections({
  code: ['cmsg.email', 'cmsg.form', 'entity.tenant', 'cmsg.common']
}), _dec2 = Form.create({
  fieldNameProp: null
}), _dec3 = connect(function (_ref) {
  var loading = _ref.loading,
      email = _ref.email;
  return {
    email: email,
    tenantId: getCurrentOrganizationId(),
    tenantRoleLevel: isTenantRoleLevel(),
    fetchEmailLoading: loading.effects['email/fetchEmail'],
    updateEmailLoading: loading.effects['email/updateEmail'],
    createEmailLoading: loading.effects['email/createEmail'],
    detailLoading: loading.effects['email/queryEmailServers'],
    filterLoading: loading.effects['email/updateFilter'],
    deleteFilterLoading: loading.effects['email/deleteFilter'],
    fetchFilterLoading: loading.effects['email/fetchFilterList']
  };
}), _dec4 = Bind(), _dec5 = Bind(), _dec6 = Bind(), _dec7 = Bind(), _dec8 = Bind(), _dec9 = Bind(), _dec10 = Bind(), _dec11 = Bind(), _dec12 = Bind(), _dec13 = Bind(), _dec14 = Bind(), _dec15 = Bind(), _dec16 = Bind(), _dec17 = Bind(), _dec18 = Bind(), _dec19 = Bind(), _dec20 = Bind(), _dec21 = Bind(), _dec22 = Bind(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = /*#__PURE__*/function (_PureComponent) {
  _inherits(Email, _PureComponent);

  var _super = _createSuper(Email);

  function Email(props) {
    var _this;

    _classCallCheck(this, Email);

    _this = _super.call(this, props);
    _this.filterFormRef = React.createRef();
    _this.state = {
      emailFormData: {},
      currentFilter: {},
      modalVisible: false,
      filterVisible: false,
      isCopy: false
    };
    return _this;
  }

  _createClass(Email, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'email/fetchEnums'
      });
      this.fetchEmail();
      this.fetchPublicKey();
    }
    /**
     * @function fetchEmail - 获取邮箱账户列表数据
     * @param {object} params - 查询参数
     */

  }, {
    key: "fetchEmail",
    value: function fetchEmail() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var query = arguments.length > 1 ? arguments[1] : undefined;
      var _this$props = this.props,
          dispatch = _this$props.dispatch,
          _this$props$email$pag = _this$props.email.pagination,
          pagination = _this$props$email$pag === void 0 ? {} : _this$props$email$pag;
      dispatch({
        type: 'email/fetchEmail',
        payload: _objectSpread(_objectSpread({
          page: pagination
        }, params), query)
      });
    }
    /**
     * 请求公钥
     */

  }, {
    key: "fetchPublicKey",
    value: function fetchPublicKey() {
      var _this$props$dispatch = this.props.dispatch,
          dispatch = _this$props$dispatch === void 0 ? function () {} : _this$props$dispatch;
      dispatch({
        type: 'email/getPublicKey'
      });
    }
    /**
     * @function showModal - 新增显示模态框
     */

  }, {
    key: "showModal",
    value: function showModal() {
      var dispatch = this.props.dispatch;
      this.setState({
        emailFormData: {},
        isCopy: false
      });
      dispatch({
        type: 'email/updateState',
        payload: {
          emailProperties: []
        }
      });
      this.handleModalVisible(true);
    }
    /**
     * @function handleModalVisible - 控制modal显示与隐藏
     * @param {boolean} flag 是否显示modal
     */

  }, {
    key: "handleModalVisible",
    value: function handleModalVisible(flag) {
      this.setState({
        modalVisible: !!flag
      });
    }
  }, {
    key: "hideModal",
    value: function hideModal() {
      this.handleModalVisible(false);
    }
    /**
     * @function handleSearch - 搜索邮箱账户
     */

  }, {
    key: "handleSearch",
    value: function handleSearch(form) {
      this.fetchEmail({
        page: {}
      }, form.getFieldsValue());
    }
    /**
     * @function handleAddItem - 新增一条邮箱服务器配置项
     * @param {object} params - 参数
     * @param {string} params.propertyCode - 服务器配置项 - 属性名称
     * @param {string} params.propertyName - 服务器配置项 - 属性值
     */

  }, {
    key: "handleAddItem",
    value: function handleAddItem(itemValue, initData, more) {
      var _this$props2 = this.props,
          dispatch = _this$props2.dispatch,
          _this$props2$email = _this$props2.email;
      _this$props2$email = _this$props2$email === void 0 ? {} : _this$props2$email;
      var _this$props2$email$em = _this$props2$email.emailProperties,
          emailProperties = _this$props2$email$em === void 0 ? [] : _this$props2$email$em;

      if (!more) {
        if (emailProperties.find(function (item) {
          return item.propertyCode === itemValue.propertyCode && itemValue.isCreate && item.propertyId !== itemValue.propertyId;
        })) {
          return notification.warning({
            message: intl.get('cmsg.email.view.message.title.exist').d('该配置项已存在，请忽重复添加')
          });
        }

        if (initData.propertyId) {
          var updateList = emailProperties.map(function (item) {
            if (initData.propertyId === item.propertyId) {
              return _objectSpread(_objectSpread({}, initData), itemValue);
            }

            return item;
          });
          dispatch({
            type: 'email/updateState',
            payload: {
              emailProperties: updateList
            }
          });
        } else {
          dispatch({
            type: 'email/updateState',
            payload: {
              emailProperties: [].concat(_toConsumableArray(emailProperties), [_objectSpread({}, itemValue)])
            }
          });
        }
      } else {
        dispatch({
          type: 'email/updateState',
          payload: {
            emailProperties: _toConsumableArray(itemValue)
          }
        });
      }
    }
    /**
     * @function handleDeleteItem - 删除一条邮箱服务器配置项
     * @param {object} record - 要删除的服务器配置项
     */

  }, {
    key: "handleDeleteItem",
    value: function handleDeleteItem(record) {
      var _this$props3 = this.props,
          dispatch = _this$props3.dispatch,
          emailProperties = _this$props3.email.emailProperties;
      var newList = emailProperties.filter(function (item) {
        return item.propertyId !== record.propertyId;
      });
      dispatch({
        type: 'email/updateState',
        payload: {
          emailProperties: newList
        }
      });
    }
    /**
     * @function handleAdd - 新增一条邮箱服务器配置项
     * @param {object} params - 新增参数
     */

  }, {
    key: "handleSaveEmail",
    value: function handleSaveEmail(fieldsValue) {
      var _this2 = this;

      var _this$props4 = this.props,
          dispatch = _this$props4.dispatch,
          _this$props4$email = _this$props4.email,
          emailProperties = _this$props4$email.emailProperties,
          publicKey = _this$props4$email.publicKey;
      var _this$state = this.state,
          isCopy = _this$state.isCopy,
          emailFormData = _this$state.emailFormData;
      var dataSource = !emailFormData.serverId || isCopy ? {} : emailFormData;

      var newValue = _objectSpread({}, fieldsValue);

      if (fieldsValue.passwordEncrypted) {
        newValue.passwordEncrypted = encryptPwd(fieldsValue.passwordEncrypted, publicKey);
      }

      dispatch({
        type: "email/".concat(!emailFormData.serverId || isCopy ? 'createEmail' : 'updateEmail'),
        payload: _objectSpread(_objectSpread(_objectSpread({}, dataSource), newValue), {}, {
          enabledFlag: fieldsValue.enabledFlag ? 1 : 0,
          emailProperties: emailProperties.map(function (item, index, arr) {
            if (item.isCreate) {
              // eslint-disable-next-line
              delete arr[index].propertyId;
            }

            return _objectSpread(_objectSpread({}, item), {}, {
              tenantId: fieldsValue.tenantId
            });
          })
        })
      }).then(function (res) {
        if (res) {
          notification.success();

          _this2.handleModalVisible(false);

          _this2.handleSearch(_this2.filterFormRef.current.props.form);
        }
      });
    }
    /**
     * @function handleUpdateEmail - 编辑邮箱账户行数据
     * @param {object} record - 行数据
     */

  }, {
    key: "handleUpdateEmail",
    value: function handleUpdateEmail(record) {
      var dispatch = this.props.dispatch;
      this.setState({
        emailFormData: record,
        isCopy: false
      });
      this.handleModalVisible(true);
      dispatch({
        type: 'email/queryEmailServers',
        payload: {
          serverId: record.serverId
        }
      });
    }
  }, {
    key: "handleCopy",
    value: function handleCopy(record) {
      this.setState({
        emailFormData: record,
        isCopy: true
      });
      this.handleModalVisible(true);
    }
    /**
     * @function handlePagination - 分页操作
     */

  }, {
    key: "handlePagination",
    value: function handlePagination(pagination) {
      this.fetchEmail({
        page: pagination
      });
    }
  }, {
    key: "handleShowFilter",
    value: function handleShowFilter(record) {
      this.setState({
        filterVisible: true,
        currentFilter: record
      });
      this.handleFilterSearch({
        serverId: record.serverId,
        address: record.address
      });
    }
  }, {
    key: "handleFilterCancel",
    value: function handleFilterCancel() {
      this.setState({
        filterVisible: false
      });
    }
  }, {
    key: "handleFilterSearch",
    value: function handleFilterSearch() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var _this$props5 = this.props,
          dispatch = _this$props5.dispatch,
          _this$props5$email$fi = _this$props5.email.filterPagination,
          filterPagination = _this$props5$email$fi === void 0 ? {} : _this$props5$email$fi;
      var _this$state$currentFi = this.state.currentFilter;
      _this$state$currentFi = _this$state$currentFi === void 0 ? {} : _this$state$currentFi;
      var serverId = _this$state$currentFi.serverId;
      dispatch({
        type: 'email/fetchFilterList',
        payload: _objectSpread({
          page: filterPagination,
          serverId: serverId
        }, params)
      });
    }
  }, {
    key: "handleFilterEdit",
    value: function handleFilterEdit(record, flag) {
      var _this$props6 = this.props,
          dispatch = _this$props6.dispatch,
          _this$props6$email = _this$props6.email;
      _this$props6$email = _this$props6$email === void 0 ? {} : _this$props6$email;
      var _this$props6$email$fi = _this$props6$email.filterList,
          filterList = _this$props6$email$fi === void 0 ? [] : _this$props6$email$fi;
      var newList = filterList.map(function (item) {
        if (record.emailFilterId === item.emailFilterId) {
          return _objectSpread(_objectSpread({}, item), {}, {
            _status: flag ? 'update' : ''
          });
        }

        return item;
      });
      dispatch({
        type: 'email/updateState',
        payload: {
          filterList: newList
        }
      });
    }
  }, {
    key: "handleFilterDelete",
    value: function handleFilterDelete() {
      var _this3 = this;

      var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      var _this$props7 = this.props,
          dispatch = _this$props7.dispatch,
          _this$props7$email = _this$props7.email;
      _this$props7$email = _this$props7$email === void 0 ? {} : _this$props7$email;
      var _this$props7$email$fi = _this$props7$email.filterList,
          filterList = _this$props7$email$fi === void 0 ? [] : _this$props7$email$fi;
      var filterData = data.filter(function (item) {
        return item._status !== 'create';
      }); // 删除未保存的数据

      var createList = data.filter(function (item) {
        return item._status === 'create';
      });

      if (createList.length > 0) {
        var deleteList = filterList.filter(function (item) {
          return !keys.includes(item.emailFilterId);
        });
        dispatch({
          type: 'email/updateState',
          payload: {
            filterList: deleteList
          }
        });
        notification.success();
      }

      if (filterData.length > 0) {
        dispatch({
          type: 'email/deleteFilter',
          payload: filterData
        }).then(function (res) {
          if (res) {
            notification.success();

            _this3.handleFilterSearch();
          }
        });
      }
    }
  }, {
    key: "handleFilterCreate",
    value: function handleFilterCreate(data) {
      var _this$props8 = this.props,
          dispatch = _this$props8.dispatch,
          _this$props8$email$fi = _this$props8.email.filterList,
          filterList = _this$props8$email$fi === void 0 ? [] : _this$props8$email$fi;
      dispatch({
        type: 'email/updateState',
        payload: {
          filterList: [].concat(_toConsumableArray(filterList), [data])
        }
      });
    }
  }, {
    key: "handleFilterOk",
    value: function handleFilterOk(data) {
      var _this4 = this;

      var dispatch = this.props.dispatch;
      dispatch({
        type: 'email/updateFilter',
        payload: data
      }).then(function (res) {
        if (res) {
          notification.success();

          _this4.handleFilterCancel(false);
        }
      });
    }
  }, {
    key: "handleDelete",
    value: function handleDelete(record) {
      var _this5 = this;

      var dispatch = this.props.dispatch;
      dispatch({
        type: 'email/deleteEmail',
        payload: record
      }).then(function (res) {
        if (res) {
          notification.success();

          _this5.handleSearch(_this5.filterFormRef.current.props.form);
        }
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this6 = this;

      var _this$props9 = this.props,
          fetchEmailLoading = _this$props9.fetchEmailLoading,
          updateEmailLoading = _this$props9.updateEmailLoading,
          createEmailLoading = _this$props9.createEmailLoading,
          tenantRoleLevel = _this$props9.tenantRoleLevel,
          path = _this$props9.match.path,
          _this$props9$detailLo = _this$props9.detailLoading,
          detailLoading = _this$props9$detailLo === void 0 ? false : _this$props9$detailLo,
          _this$props9$fetchFil = _this$props9.fetchFilterLoading,
          fetchFilterLoading = _this$props9$fetchFil === void 0 ? false : _this$props9$fetchFil,
          _this$props9$filterLo = _this$props9.filterLoading,
          filterLoading = _this$props9$filterLo === void 0 ? false : _this$props9$filterLo,
          _this$props9$deleteFi = _this$props9.deleteFilterLoading,
          deleteFilterLoading = _this$props9$deleteFi === void 0 ? false : _this$props9$deleteFi,
          _this$props9$email = _this$props9.email,
          _this$props9$email$em = _this$props9$email.emailList,
          emailList = _this$props9$email$em === void 0 ? [] : _this$props9$email$em,
          emailProperties = _this$props9$email.emailProperties,
          pagination = _this$props9$email.pagination,
          enums = _this$props9$email.enums,
          _this$props9$email$fi = _this$props9$email.filterStrategyList,
          filterStrategyList = _this$props9$email$fi === void 0 ? [] : _this$props9$email$fi,
          _this$props9$email$fi2 = _this$props9$email.filterList,
          filterList = _this$props9$email$fi2 === void 0 ? [] : _this$props9$email$fi2,
          _this$props9$email$fi3 = _this$props9$email.filterPagination,
          filterPagination = _this$props9$email$fi3 === void 0 ? {} : _this$props9$email$fi3;
      var _this$state2 = this.state,
          modalVisible = _this$state2.modalVisible,
          filterVisible = _this$state2.filterVisible,
          currentFilter = _this$state2.currentFilter,
          isCopy = _this$state2.isCopy;
      var columns = [!isTenantRoleLevel() && {
        title: intl.get('entity.tenant.tag').d('租户'),
        dataIndex: 'tenantName'
      }, {
        title: intl.get('cmsg.common.view.accountCode').d('账户代码'),
        dataIndex: 'serverCode'
      }, {
        title: intl.get('cmsg.common.view.accountName').d('账户名称'),
        dataIndex: 'serverName'
      }, {
        title: intl.get('cmsg.email.model.email.host').d('邮件服务器'),
        width: 200,
        dataIndex: 'host'
      }, {
        title: intl.get('cmsg.email.model.email.port').d('端口'),
        width: 100,
        dataIndex: 'port'
      }, {
        title: intl.get('cmsg.email.model.email.filterStrategy').d('安全策略'),
        width: 100,
        dataIndex: 'filterStrategyMeaning'
      }, isTenantRoleLevel() && !VERSION_IS_OP && {
        title: intl.get('cmsg.common.view.source').d('来源'),
        width: 120,
        dataIndex: 'tenantId',
        render: function render(_, record) {
          var tenantId = _this6.props.tenantId;
          return tenantId.toString() === record.tenantId.toString() ? /*#__PURE__*/React.createElement(Tag, {
            color: "green"
          }, intl.get('cpaas.common.custom').d('自定义')) : /*#__PURE__*/React.createElement(Tag, {
            color: "orange"
          }, intl.get('cpaas.common.predefined').d('预定义'));
        }
      }, {
        title: intl.get('cpaas.common.status').d('状态'),
        width: 100,
        dataIndex: 'enabledFlag',
        render: enableRender
      }, {
        title: intl.get('cpaas.common.button.action').d('操作'),
        width: 220,
        fixed: 'right',
        render: function render(text, record) {
          var operators = [];
          var tenantId = _this6.props.tenantId;

          if (tenantId.toString() === record.tenantId.toString() || !isTenantRoleLevel()) {
            operators.push({
              key: 'edit',
              ele: /*#__PURE__*/React.createElement(ButtonPermission, {
                type: "text",
                permissionList: [{
                  code: "".concat(path, ".button.edit"),
                  type: 'button',
                  meaning: '邮箱账户-编辑'
                }],
                onClick: function onClick() {
                  return _this6.handleUpdateEmail(record);
                }
              }, intl.get('cpaas.common.button.edit').d('编辑')),
              len: 2,
              title: intl.get('cpaas.common.button.edit').d('编辑')
            });
          }

          if (tenantId.toString() !== record.tenantId.toString() && isTenantRoleLevel() && !VERSION_IS_OP) {
            operators.push({
              key: 'copy',
              ele: /*#__PURE__*/React.createElement("a", {
                onClick: function onClick() {
                  return _this6.handleCopy(record);
                }
              }, intl.get('cpaas.common.button.copy').d('复制')),
              len: 2,
              title: intl.get('cpaas.common.button.copy').d('复制')
            });
          }

          if (tenantId.toString() === record.tenantId.toString() || !isTenantRoleLevel()) {
            operators.push({
              key: 'filter',
              ele: /*#__PURE__*/React.createElement(ButtonPermission, {
                type: "text",
                permissionList: [{
                  code: "".concat(path, ".button.filter"),
                  type: 'button',
                  meaning: '邮箱账户-设置黑白名单'
                }],
                onClick: function onClick() {
                  return _this6.handleShowFilter(record);
                }
              }, intl.get('cmsg.email.button.filter').d('设置黑白名单')),
              len: 6,
              title: intl.get('cmsg.email.button.filter').d('设置黑白名单')
            });
          }

          if (tenantId.toString() === record.tenantId.toString() && isTenantRoleLevel() && !VERSION_IS_OP) {
            operators.push({
              key: 'delete',
              ele: /*#__PURE__*/React.createElement(Popconfirm, {
                title: intl.get("cmsg.email.view.message.title.confirmDelete").d('确定删除该数据吗？'),
                onConfirm: function onConfirm() {
                  return _this6.handleDelete(record);
                },
                style: {
                  textAlign: 'center'
                }
              }, /*#__PURE__*/React.createElement("a", null, intl.get('cpaas.common.button.delete').d('删除'))),
              len: 2,
              title: intl.get('cpaas.common.button.delete').d('删除')
            });
          }

          return operatorRender(operators);
        }
      }].filter(Boolean);
      var filterProps = {
        currentFilter: currentFilter,
        fetchLoading: fetchFilterLoading,
        deleteLoading: deleteFilterLoading,
        loading: filterLoading,
        dataSource: filterList,
        visible: filterVisible,
        pagination: filterPagination,
        onOk: this.handleFilterOk,
        onCancel: this.handleFilterCancel,
        onDelete: this.handleFilterDelete,
        onCreate: this.handleFilterCreate,
        onSearch: this.handleFilterSearch,
        onEdit: this.handleFilterEdit,
        path: path
      };
      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
        title: intl.get('cmsg.email.view.message.title').d('邮箱账户')
      }, /*#__PURE__*/React.createElement(ButtonPermission, {
        permissionList: [{
          code: "".concat(path, ".button.create"),
          type: 'button',
          meaning: '邮箱账户-新建'
        }],
        icon: "plus",
        type: "primary",
        onClick: this.showModal
      }, intl.get('cpaas.common.status.create').d('新建'))), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement("div", {
        className: "table-list-search"
      }, /*#__PURE__*/React.createElement(SearchForm, {
        onSearch: this.handleSearch,
        wrappedComponentRef: this.filterFormRef
      })), /*#__PURE__*/React.createElement(Table, {
        bordered: true,
        rowKey: "serverId",
        loading: fetchEmailLoading,
        dataSource: emailList,
        columns: columns,
        scroll: {
          x: tableScrollWidth(columns)
        },
        pagination: pagination,
        onChange: this.handlePagination
      }), /*#__PURE__*/React.createElement(EmailForm, {
        title: "".concat(this.state.emailFormData.serverId ? intl.get('cmsg.email.view.message.title.modal.edit').d('编辑邮箱账户') : intl.get('cmsg.email.view.message.title.modal.create').d('新建邮箱账户')),
        loading: this.state.emailFormData.serverId ? updateEmailLoading : createEmailLoading,
        detailLoading: detailLoading,
        modalVisible: modalVisible,
        onCancel: this.hideModal,
        onOk: this.handleSaveEmail,
        initData: this.state.emailFormData,
        itemList: emailProperties,
        addItem: this.handleAddItem,
        deleteItem: this.handleDeleteItem,
        tenantRoleLevel: tenantRoleLevel,
        enums: enums,
        filterStrategyList: filterStrategyList,
        path: path,
        isCopy: isCopy
      }), filterVisible && /*#__PURE__*/React.createElement(Filter, filterProps)));
    }
  }]);

  return Email;
}(PureComponent), (_applyDecoratedDescriptor(_class2.prototype, "fetchPublicKey", [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchPublicKey"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "showModal", [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, "showModal"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleModalVisible", [_dec6], Object.getOwnPropertyDescriptor(_class2.prototype, "handleModalVisible"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "hideModal", [_dec7], Object.getOwnPropertyDescriptor(_class2.prototype, "hideModal"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleSearch", [_dec8], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSearch"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleAddItem", [_dec9], Object.getOwnPropertyDescriptor(_class2.prototype, "handleAddItem"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleDeleteItem", [_dec10], Object.getOwnPropertyDescriptor(_class2.prototype, "handleDeleteItem"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleSaveEmail", [_dec11], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSaveEmail"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleUpdateEmail", [_dec12], Object.getOwnPropertyDescriptor(_class2.prototype, "handleUpdateEmail"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleCopy", [_dec13], Object.getOwnPropertyDescriptor(_class2.prototype, "handleCopy"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handlePagination", [_dec14], Object.getOwnPropertyDescriptor(_class2.prototype, "handlePagination"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleShowFilter", [_dec15], Object.getOwnPropertyDescriptor(_class2.prototype, "handleShowFilter"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterCancel", [_dec16], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterCancel"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterSearch", [_dec17], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterSearch"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterEdit", [_dec18], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterEdit"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterDelete", [_dec19], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterDelete"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterCreate", [_dec20], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterCreate"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleFilterOk", [_dec21], Object.getOwnPropertyDescriptor(_class2.prototype, "handleFilterOk"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleDelete", [_dec22], Object.getOwnPropertyDescriptor(_class2.prototype, "handleDelete"), _class2.prototype)), _class2)) || _class) || _class) || _class);
export { Email as default };